<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Core.Domain.Model.Customer>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Registry
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

 

    <h2>Registry</h2>

    <%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            
           
            <p>
                <label for="name">name:</label>
                <%= Html.TextBox("name") %>
                <%= Html.ValidationMessage("name", "*") %>
            </p>
            <p>
                <label for="password">password:</label>
                <%= Html.Password("password") %>
                <%= Html.ValidationMessage("password", "*") %>
            </p>
            <p>
                <label for="mail">mail:</label>
                <%= Html.TextBox("mail") %>
                <%= Html.ValidationMessage("mail", "*") %>
            </p>
            
            <p>
                <input id="registry" type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <%--<script type="text/javascript">
    	$(function() {
	    	$("#registry").click(function() {
    			$("#error").text('').hide();
    			$.get('http://localhost:21259/SSOService.svc/user/Registry?callback=?',
    				{ username: $("#name").val(), password: $("#password").val(), mail: $("#mail").val() },
    				function(ssodata) {
    				if (ssodata.Status == 'DENIED') {
    					$("#error").text('registry Failed').show();
    				} else {
    					// redirect to authentication page instead of duplicating code here
    					document.location = '<%=Url.Action("Authenticate", "Account") %>';
    				}
    				// make sure to tell jQuery this is a JSONP call
    			}, 'jsonp');
    		});
    	});
    </script>

    </form>--%>

</asp:Content>

